
// Copyright (C) 2010-2011 Luca Piccioni
// 
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//   
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
// 
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

using System.Collections.Generic;
using System.Diagnostics;

namespace Derm.Render
{
	/// <summary>
	/// Texture procedure stage.
	/// </summary>
	public class TextureStage
	{
		#region Constructors

		/// <summary>
		/// Construct a TextureStage.
		/// </summary>
		/// <param name="tex"></param>
		/// <param name="op"></param>
		public TextureStage(Texture tex, StageOp op)
		{
			Debug.Assert(tex != null);

			// Store texture
			mTexture = tex;
			// Store operation
			mOperation = op;
		}

		#endregion

		#region Stage Operation

		/// <summary>
		/// Texture stage operation.
		/// </summary>
		public enum StageOp
		{
			/// <summary>
			/// Replace current color with texture color.
			/// </summary>
			Replace,
			/// <summary>
			/// Modulate current color with texture color.
			/// </summary>
			Modulate,
			/// <summary>
			/// Blend current color with texture color.
			/// </summary>
			Blend,
			/// <summary>
			/// Add to current color the texture color.
			/// </summary>
			Add,
		}

		/// <summary>
		/// Stage texture operation.
		/// </summary>
		public StageOp StageOperation { get { return (mOperation); } }

		/// <summary>
		/// Texture right operand.
		/// </summary>
		private Texture mTexture;
		/// <summary>
		/// Texture stage operation.
		/// </summary>
		private StageOp mOperation;

		#endregion
	}
}